/* 
 * File:   Dataset.h
 * Author: cjjonker
 *
 * Created on 20 december 2012, 15:29
 */

#ifndef DATASET_H
#define	DATASET_H

#include <string>
#include <iostream>

template<typename Data>
class Dataset {

    public:
        Dataset(){};
        Dataset(Data *dat, int dim);
        
        void setData(Data *dat, int dim);
        
        virtual Data getData(int x);
        virtual Data getData(float x, float y);
    
    protected:
        int d_dim;
        Data *d_data;
};




template<typename Data>
Dataset<Data>::Dataset(Data* dat, int dim)
: d_data(dat), d_dim(dim)
{
}

template<typename Data>
void Dataset<Data>::setData(Data* dat, int dim)
{
    d_data = dat;
    d_dim = dim;
}

// Returns interpolated datapoint (or vector)
template<typename Data>
Data Dataset<Data>::getData(float x, float y)
{
    //hier moet de interpolatie, deze roept getData(int idx) aan.
}

// Returns datapoint at specific index
template<typename Data>
Data Dataset<Data>::getData(int idx)
{
    return d_data[idx];
}

#endif	/* DATASET_H */

